From: Keir Fraser Date: Tue, 23 Jun 2009 10:20:10 +0000 (+0100) Subject: xend: Fix tapdisk creation for managed domains X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13715 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7aeb062fbc2b4075c03afa8fed7fb0158a461407;p=xen.git xend: Fix tapdisk creation for managed domains The first start of a managed domain succeeds. But the second start of the managed domain fails as follows. The problem occurs when tapdisks are given to the managed domain. I think that the problem occurs because the uname of tapdisks is overwritten with "phy:/dev/xen/tadisk-2/tapdev*". Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index 8b718deb3a..a9c9c4d53a 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -1360,6 +1360,7 @@ class XendConfig(dict): if dev_info['uname'].split(':')[1] not in blktap_disk_types: raise XendConfigError("tap:%s not a valid disk type" % dev_info['uname'].split(':')[1]) + dev_info['required_uname'] = dev_info['uname'] if dev_type == 'vif': if not dev_info.get('mac'): diff --git a/tools/python/xen/xend/server/BlktapController.py b/tools/python/xen/xend/server/BlktapController.py index 2e6c93a896..a5c040fc45 100644 --- a/tools/python/xen/xend/server/BlktapController.py +++ b/tools/python/xen/xend/server/BlktapController.py @@ -120,7 +120,7 @@ class BlktapController(BlkifController): def createDevice(self, config): - uname = config.get('uname', '') + uname = config.get('required_uname', '') try: (typ, subtyp, params, file) = string.split(uname, ':', 3) except: